package com.xiaobai.server.controller;

import com.xiaobai.server.TicketService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yangdaji
 * @version 1.0
 * @Description:
 * @date 22-2-11 下午 6:31
 */

@RestController
@RequestMapping("/buy")
public class BuyConsumer {

    /**
     * 远程调用
     */
    @DubboReference
    private TicketService ticketService;

    @RequestMapping("/get")
    public String getConsumer(){
        return ticketService.getTicket();
    }

}
